
#pragma once
#include "GSE_Predefines.h"
namespace GSE
{
	class CThreadPool
	{
	public:
		CThreadPool();
		~CThreadPool();
	public:
		void Init(bool bUseMultiThread);

		boost::asio::io_service& GetIOService();
		void ReleaseIOService(boost::asio::io_service& );
		uint Run();
	private:
		bool m_bUseMultiThread;
		uint m_uMaxThreads;
		boost::asio::io_service * m_IOServices;
		std::vector<uint> m_uUsedCount;
		std::vector<boost::thread> m_WorkerThreads;
	};
}